[SUBROUTINE]
version = 1.14
icon = line-to.png
name = _("Line To")
type = poly-line-to
help = _("<b>Create a line to X, Y</b>&#10;Absolute or Relative with optional styled corner")
order = act h2 cs cr rev h1 type x y h3 ted te

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
value = 1

[PARAM_H1]
name = _("Coords")
type = sub-header
tool_tip = _("Relative or absolute position")

[PARAM_X]
name = _("X")
header = h1
type = float
icon = x.png
tool_tip = _("Destination X")
value = 1
metric_value = 30

[PARAM_Y]
name = _("Y")
header = h1
type = float
icon = y.png
tool_tip = _("Destination Y")
value = 1
metric_value = 25

[PARAM_TYPE]
name = _("Option")
header = h1
type = combo
options = _("Relative=0:Absolute=1:X relative, Y absolute=10:X absolute, Y relative=11")
icon = line-rel.png
tool_tip = _("Select Relative or Absolute")
value = 0

[PARAM_H2]
name = _("Link")
type = sub-header
tool_tip = _("Link style with previous item")

[PARAM_CS]
name = _("Type")
header = h2
type = combo
options = _("None=0:Rounded=1:Beveled=2:Inverted Round=3")
icon = corner-style.png
tool_tip = _("Select link type")
value = 0

[PARAM_CR]
name = _("Radius")
header = h2
type = float
minimum_value = 0.0
icon = corner-radius.png
tool_tip = _("Radius for rounded or distance from apex")
value = 0.3
metric_value = 6

[PARAM_REV]
name = _("Complement")
icon = complement.png
type = bool
header = h2
tool_tip = _("Reverse direction of tool path for rounded or inverted round")
value = 0

[PARAM_H3]
name = _("Milling")
type = sub-header
hidden = 1

[PARAM_TED]
name = _("Tool engagement")
type = combo-user
options = _("Global=0:Specific=1")
icon = tool-eng.png
links = te=1
value = 0
header = h3
tool_tip = _("Tool engagement for this segment")

[PARAM_TE]
name = _("Tool engagement")
type = int
value = 100
header = h3 
maximum_value = 100
minimum_value = 0
hidden = 1
suffix = %

[CALL]
content =
	(begin #sub_name)
	(line to absolute or relative position author : Fernand Veilleux)
	
	o<#self_id_active> if [#param_act AND #<in_polyline>]
		o<select> CALL [31] [#param_ted] [#<poly_global_engagement>] [#param_te]
		
		o<poly_add_item> CALL [#param_type] [#param_x] [#param_y] [1] [#param_cs] [#param_cr] [#param_rev] [#31]
		
	o<#self_id_active> endif
	(end #sub_name)
